package com.wudl.govern.controller;

import cn.hutool.core.collection.CollUtil;
import com.wudl.govern.db.constants.DbQueryProperty;
import com.wudl.govern.domain.DbSource;
import com.wudl.govern.service.MetadataSourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.stream.Collectors;

/**
 * @author ：wudl
 * @date ：Created in 2022-04-03 17:05
 * @description：
 * @modified By：
 * @version: 1.0
 */
@RestController
@RequestMapping(value = "/dbsync")
public class MetaAsynController {

    @Autowired
    MetadataSourceService metadataSourceService;

    @PostMapping(value = "/doMetaDataSync")
    public String doMetaDataSync(@RequestBody  DbSource dbSource) {

        String s = metadataSourceService.syncMetadata(dbSource);
        return s;

    }

}
